Skip to content

Conversation

@dbrnz
Copy link
Collaborator

@dbrnz dbrnz commented Aug 28, 2025

@napakalas please test this and see if it resolves the inconsistent geojson ids.

An error is now logged when attempting to add a feature with a duplicate id, and we make sure mapmaker doesn't internally assign duplicate ids.

@dbrnz
Copy link
Collaborator Author

dbrnz commented Aug 28, 2025

Hmm, this results in:

2025-08-28T02:22:19.080913Z [error    ] Duplicate feature id           id=bolser_23-1
2025-08-28T02:22:19.081134Z [error    ] Duplicate feature id           id=bolser_24-1
2025-08-28T02:22:19.094713Z [error    ] Duplicate feature id           id=digestive_12-1
2025-08-28T02:22:19.094885Z [error    ] Duplicate feature id           id=digestive_19-1
2025-08-28T02:22:19.095028Z [error    ] Duplicate feature id           id=digestive_18-1
2025-08-28T02:22:19.095143Z [error    ] Duplicate feature id           id=digestive_21-1
2025-08-28T02:22:19.095253Z [error    ] Duplicate feature id           id=digestive_20-1
2025-08-28T02:22:19.095360Z [error    ] Duplicate feature id           id=digestive_79-1

and lots of duplicate ids for each neuron path.

The path features shouldn't have id set, as it is models that identifies them.

@dbrnz
Copy link
Collaborator Author

dbrnz commented Aug 28, 2025

@napakalas this is now all looking good in terms making a rat map without duplicate ids turning up -- over to you to see if the inconsistent geojson ids are resolved.

@napakalas
Copy link
Contributor

I’m generating all the maps now and will let you know once they’re ready.

@napakalas
Copy link
Contributor

Confirm that the results are now consistent between ./annotations and ./pathways. All paths in all maps now have connectivity, and they all load correctly in CQ.

However, there is missing node information that needs to be discussed (new issue?). For example, in the case of aacar-5, the rendered connectivity (./pathways) is consistent with nodes (./annotations):

790: ['UBERON:0004677', ['UBERON:0006493']],
1079: ['UBERON:0001896', []],
1101: ['UBERON:0009050', []]

This is consistent and correct.
However, this path is missing all the spine nodes, such as:

['UBERON:0006469', []], ['UBERON:0006489', []], ['UBERON:0006488', []],
['UBERON:0006490', []], ['UBERON:0006491', []], ['UBERON:0006492', []]

These nodes are available in ./annotations.

@napakalas
Copy link
Contributor

The missing node issue only occurs in the human maps (male and female); other maps are fine.

@dbrnz
Copy link
Collaborator Author

dbrnz commented Aug 28, 2025

@napakalas with human male I get:

2025-08-28T04:48:17.812670Z [error    ] Duplicate feature id           id=S48_T1
2025-08-28T04:48:17.812792Z [error    ] Duplicate feature id           id=S48_T2
2025-08-28T04:48:17.812831Z [error    ] Duplicate feature id           id=S48_T3
2025-08-28T04:48:17.812861Z [error    ] Duplicate feature id           id=S48_T4
2025-08-28T04:48:17.812888Z [error    ] Duplicate feature id           id=S48_T5
2025-08-28T04:48:17.812912Z [error    ] Duplicate feature id           id=S48_T6
2025-08-28T04:48:17.812936Z [error    ] Duplicate feature id           id=S48_T7
2025-08-28T04:48:17.812960Z [error    ] Duplicate feature id           id=S48_T8
2025-08-28T04:48:17.812983Z [error    ] Duplicate feature id           id=S48_T9
2025-08-28T04:48:17.813005Z [error    ] Duplicate feature id           id=S48_T10
2025-08-28T04:48:17.813027Z [error    ] Duplicate feature id           id=S48_T11
2025-08-28T04:48:17.813049Z [error    ] Duplicate feature id           id=S48_T12
2025-08-28T04:48:17.813071Z [error    ] Duplicate feature id           id=S48_L1
2025-08-28T04:48:17.813093Z [error    ] Duplicate feature id           id=S48_L2
2025-08-28T04:48:17.813115Z [error    ] Duplicate feature id           id=S48_L3
2025-08-28T04:48:17.813137Z [error    ] Duplicate feature id           id=S48_L4
2025-08-28T04:48:17.813160Z [error    ] Duplicate feature id           id=S48_L5
2025-08-28T04:48:17.813182Z [error    ] Duplicate feature id           id=S48_S1
2025-08-28T04:48:17.813204Z [error    ] Duplicate feature id           id=S48_S2
2025-08-28T04:48:17.813226Z [error    ] Duplicate feature id           id=S48_S3
2025-08-28T04:48:17.813248Z [error    ] Duplicate feature id           id=S48_S4
2025-08-28T04:48:17.813272Z [error    ] Duplicate feature id           id=S48_S5
2025-08-28T04:48:17.813482Z [error    ] Duplicate feature id           id=S49_T1
2025-08-28T04:48:17.813514Z [error    ] Duplicate feature id           id=S49_T2
2025-08-28T04:48:17.813539Z [error    ] Duplicate feature id           id=S49_T3
2025-08-28T04:48:17.813562Z [error    ] Duplicate feature id           id=S49_T4
2025-08-28T04:48:17.813585Z [error    ] Duplicate feature id           id=S49_T5
2025-08-28T04:48:17.813608Z [error    ] Duplicate feature id           id=S49_T6
2025-08-28T04:48:17.813629Z [error    ] Duplicate feature id           id=S49_T7
2025-08-28T04:48:17.813651Z [error    ] Duplicate feature id           id=S49_T8
2025-08-28T04:48:17.813673Z [error    ] Duplicate feature id           id=S49_T9
2025-08-28T04:48:17.813694Z [error    ] Duplicate feature id           id=S49_T10
2025-08-28T04:48:17.813716Z [error    ] Duplicate feature id           id=S49_T11
2025-08-28T04:48:17.813737Z [error    ] Duplicate feature id           id=S49_T12
2025-08-28T04:48:17.813758Z [error    ] Duplicate feature id           id=S49_L1
2025-08-28T04:48:17.813780Z [error    ] Duplicate feature id           id=S49_L2
2025-08-28T04:48:17.813801Z [error    ] Duplicate feature id           id=S49_L3
2025-08-28T04:48:17.813822Z [error    ] Duplicate feature id           id=S49_L4
2025-08-28T04:48:17.813844Z [error    ] Duplicate feature id           id=S49_L5
2025-08-28T04:48:17.813886Z [error    ] Duplicate feature id           id=S49_S1
2025-08-28T04:48:17.813908Z [error    ] Duplicate feature id           id=S49_S2
2025-08-28T04:48:17.813930Z [error    ] Duplicate feature id           id=S49_S3
2025-08-28T04:48:17.813952Z [error    ] Duplicate feature id           id=S49_S4
2025-08-28T04:48:17.814098Z [error    ] Duplicate feature id           id=S49_S5
2025-08-28T04:48:17.820264Z [error    ] Duplicate feature id           id=S46_L5
2025-08-28T04:48:17.836891Z [error    ] Duplicate feature id           id=S51_S3
2025-08-28T04:48:17.837001Z [error    ] Duplicate feature id           id=S42_S3
2025-08-28T04:48:17.837042Z [error    ] Duplicate feature id           id=S41_S3
2025-08-28T04:48:17.837077Z [error    ] Duplicate feature id           id=S40_S3
2025-08-28T04:48:17.837105Z [error    ] Duplicate feature id           id=S39_S3
2025-08-28T04:48:17.837130Z [error    ] Duplicate feature id           id=S37_S3
2025-08-28T04:48:17.837155Z [error    ] Duplicate feature id           id=S36_S3
2025-08-28T04:48:17.837193Z [error    ] Duplicate feature id           id=S35_S3
2025-08-28T04:48:17.837218Z [error    ] Duplicate feature id           id=S34_S3
2025-08-28T04:48:17.837242Z [error    ] Duplicate feature id           id=S33_S3
2025-08-28T04:48:17.839828Z [error    ] Duplicate feature id           id=S51_S3
2025-08-28T04:48:17.839881Z [error    ] Duplicate feature id           id=S42_S3
2025-08-28T04:48:17.839916Z [error    ] Duplicate feature id           id=S41_S3
2025-08-28T04:48:17.839945Z [error    ] Duplicate feature id           id=S40_S3
2025-08-28T04:48:17.839969Z [error    ] Duplicate feature id           id=S39_S3
2025-08-28T04:48:17.839992Z [error    ] Duplicate feature id           id=S37_S3
2025-08-28T04:48:17.840014Z [error    ] Duplicate feature id           id=S36_S3
2025-08-28T04:48:17.840037Z [error    ] Duplicate feature id           id=S35_S3
2025-08-28T04:48:17.840060Z [error    ] Duplicate feature id           id=S34_S3
2025-08-28T04:48:17.840082Z [error    ] Duplicate feature id           id=S33_S3
2025-08-28T04:48:18.125668Z [error    ] Duplicate feature id           id=S40_C7

and randomly checking a few of these ids in human_flatmap_male.svg (searching with a text editor is sufficient) finds that the ids are indeed duplicated.

Why have different geometric shapes been identified as being the same?? Fixing the ids in the SVG should resolve the missing node issue.

@napakalas
Copy link
Contributor

Yeah, those should be fixed by differentiating left and right in the flatmap source. I’ll fix that and create a PR.

The case I mentioned earlier is different. It’s related to elements with the .group markup, such as:
.group class(spinal_1) id(spinal_1-1) -> (UBERON:0006469)
This one doesn’t cause duplicate ID issues. In the human maps, these .group elements exist, but in the other maps they don’t — which is why the issue doesn’t appear there. However, the non-human maps also miss the zoom-out feature that should show the whole area as spines, e.g., UBERON:0006469.

@napakalas
Copy link
Contributor

napakalas commented Aug 28, 2025

Here is the difference between the renderings of aacar-15 in the human and rat maps: the related spines are not highlighted in the human map, but they are highlighted in the rat map.

male human:
Screenshot 2025-08-28 at 6 00 45 PM

rat:
Screenshot 2025-08-28 at 6 01 33 PM

@napakalas
Copy link
Contributor

napakalas commented Aug 28, 2025

Some objects, such as the white communicating ramus, do not have ontology terms that specify laterality. As a result, both left and right positions share the same ontology term (e.g., ILX:0793209), but they are given different IDs (S43_T3-Right and S43_T3-Left).
When rendering a path, the selected object could be either the left or right side. While this is conceptually correct, it can lead to odd renderings (as shown in the attached image), since the left or right object may be chosen randomly.
To ensure consistent rendering, should we assign ILX:0793209 only to S43_T3-Right, or to both S43_T3-Right and S43_T3-Left?

Screenshot 2025-08-28 at 7 33 07 PM

@dbrnz
Copy link
Collaborator Author

dbrnz commented Aug 28, 2025

To ensure consistent rendering, should we assign ILX:0793209 only to S43_T3-Right, or to both S43_T3-Right and S43_T3-Left?

Maybe this is a question for @nickerso? Or do we have a convention of say keeping to the left? Or simply continue being random?

I suspect that we've now dealt with the original #160 issue and this PR can be merged. There though are three new issues that need to be raised and resolved:

  1. the human maps need to distinguish the ids of left and right spinal cord features.
  2. the difference between rat an human wrt the use of group markup on the spinal segments and how this changes highlighting of features on a path.
  3. how to route a path that has both left and right features sharing the same term.

@dbrnz dbrnz merged commit 97eb886 into main Aug 29, 2025
2 checks passed
@dbrnz dbrnz deleted the issue-#160 branch August 29, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants